package com.bocloud.cmp.driver.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.bocloud.cmp.enums.VendorType;

/**
 * 云供应商转换器
 * 
 * @author dmw
 *
 */
public class VendorConverter {
	private static Logger logger = LoggerFactory.getLogger(VendorConverter.class);

	/**
	 * 云供应商类型转换器，报异常的时候返回未知 XVVZyFyxZSSyARgiargFBWxV6ga2Ti 7xloTcLOy3cZo9oN
	 * 
	 * @return
	 */
	public static VendorType convert(String category) {
		try {
			return VendorType.valueOf(category.trim().toUpperCase());
		} catch (Exception e) {
			logger.error("", e);
			return VendorType.UNKNOWN;
		}
	}
}
